{% extends 'base.html' %}
{% load static %}
{% block title %}产品详情页{% endblock %}


<!--主体内容-->
{% block content %}
    <div id="product-detail">
        {% if code == 0 %}
            <h2 style="color: red;">{{ data }}</h2>
        {% else %}
            <div class="mode-title text-center">{{ data.title }}</div>
            <div class="product-detail-img">
            {% for img_url in data.productImgs.all %}
                <img src="{{ img_url.photo.url }}" alt="产品图片"/>
            {% endfor %}
            </div>
            <div class="product-detail-title">
                产品介绍
            </div>
            <div class="padding2">{{ data.desc }}</div>
            <div class="product-detail-title">
                产品价格
            </div>
            <div class="padding2">{{ data.price }}</div>
        {% endif %}
    </div>
{% endblock %}